package com.zhouke.certificate.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhouke.certificate.entity.CountMonth;
import com.zhouke.certificate.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 周科
 * @since 2022-03-23
 */
public interface UserMapper extends BaseMapper<User> {
    @Select("select * from sys_user where username = #{username}")
    List<User> selectByUsername(String username);
    List<CountMonth> countUserByMonth(String year);

    Page<User> findPage(Page<User> page, @Param("realName") String realName, @Param("college")String college, @Param("identity")String identity);
}
